str = input('请输入一行字符：')
char = 0
number = 0
space = 0
for i in range(len(str)):
    if str[i].isalpha():
        char = char + 1
    if str[i].isdigit():
        number = number + 1
    if str[i].isspace():
        space = space + 1
print('该字符串中，英文字母有{},空格有{}，数字有{}'.format(char,space,number))